/*****************************************************************
 MYD Engine v0.1

 File: myd_directInput.h
 Created: 09/07/09
*****************************************************************/

#ifndef MYD_DX_INPUT_H
#define MYD_DX_INPUT_H

#define DIRECTINPUT_VERSION 0x0800

//#include "../GrogEngine.h"
#include "myd_input.h"
#include <dinput.h>

#pragma comment(lib, "dinput8.lib")
#pragma comment(lib, "dxguid.lib")

namespace myd
{
	class MYD_API DirectInput : public Input
	{
			///////////////////////////////////////////////
			// TO-DO: DirectInput has to be a singleton!!!!
			///////////////////////////////////////////////

		private:

			//DirectInput stuff
			LPDIRECTINPUT8 KeyboardObj;
			LPDIRECTINPUT8 MouseObj;

			LPDIRECTINPUTDEVICE8 KeyboardDev;
			LPDIRECTINPUTDEVICE8 MouseDev;

			DIMOUSESTATE    MouseState;
			HINSTANCE		AppInstance;
			HWND			WindowHandler;

		public:

			//constuctor
			DirectInput(HINSTANCE hInstance, HWND hWnd);

			virtual ~DirectInput();

			//overloaded from Input
			bool Init();
			void Update();
			void Deinit();
			void Reset();
			void Acquire();
			void Reacquire();
			void Unacquire();
	};
} //end namespace
#endif //MYD_DX_INPUT_H
